package xyz.msj.hrm.domain;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author mushengjie
 * @since 2020-09-18
 */
@TableName("t_course_promotion")
public class CoursePromotion extends Model<CoursePromotion> {
    /**redis存储的前缀*/
    public static final String PROMOTION = "promotion:";
    /**redis存储的表名*/
    public static final String COURSE_PROMOTION = "CoursePromotion";

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     * 促销的课程
     */
    @TableField("course_id")
    private Long courseId;
    /**
     * 课程原价
     */
    @TableField("old_price")
    private Float oldPrice;
    /**
     * 课程促销价格
     */
    private Float price;
    /**
     * 促销的课程名字
     */
    private String name;
    /**
     * 促销的课程简介
     */
    private String description;
    /**
     * 促销开始时间
     */
    @TableField("start_time")
    private Date startTime;
    /**
     * 促销结束时间
     */
    @TableField("end_time")
    private Date endTime;
    /**
     * 促销的课程的数量
     */
    private Integer number;
    /**
     * 促销状态：促销未开始，促销中，促销过期
     */
    private Integer state;
    /**
     * 课程封面
     */
    private String pic;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getCourseId() {
        return courseId;
    }

    public void setCourseId(Long courseId) {
        this.courseId = courseId;
    }

    public Float getOldPrice() {
        return oldPrice;
    }

    public void setOldPrice(Float oldPrice) {
        this.oldPrice = oldPrice;
    }

    public Float getPrice() {
        return price;
    }

    public void setPrice(Float price) {
        this.price = price;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public Integer getNumber() {
        return number;
    }

    public void setNumber(Integer number) {
        this.number = number;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public String getPic() {
        return pic;
    }

    public void setPic(String pic) {
        this.pic = pic;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "CoursePromotionDto{" +
        ", id=" + id +
        ", courseId=" + courseId +
        ", oldPrice=" + oldPrice +
        ", price=" + price +
        ", name=" + name +
        ", description=" + description +
        ", startTime=" + startTime +
        ", endTime=" + endTime +
        ", number=" + number +
        ", state=" + state +
        ", pic=" + pic +
        "}";
    }
}
